| API Documentation |  |

- MAIN PAGE
- NAMESPACES
- CLASSES

TextureExternalData.h
1 // TextureExternalData.h
3 //
5
6 namespace nkGraphics
7 {
11 enum class RESOURCE_STATE
12 {
13 COMMON = 0,
14 RENDER_TARGET,
15 DEPTH_TARGET
16 } ;
17 }
18
20
21 namespace nkGraphics
22 {
35 class TextureExternalData final
36 {
37 public :
38
39 // Destructor
43 ~TextureExternalData () ;
44
45 // Getters
51 void* getResource () const ;
57 RESOURCE_STATE getState () const ;
63 unsigned int getId () const ;
67 TEXTURE_RENDER_FLAG getRenderFlag () const ;
71 RENDERING_API getTargetApi () const ;
75 bool getGammaCorrect () const ;
76
77 // Setters
86 void setRenderFlag (TEXTURE_RENDER_FLAG value) ;
93 void setGammaCorrect (bool value) ;
94
95 public :
96
97 // Statics
98 // Construction
106 static TextureExternalData forDx11 (void* resource) ;
119 static TextureExternalData forDx12 (void* resource, RESOURCE_STATE state) ;
127 static TextureExternalData forGles (unsigned int id) ;
128 } ;
129 }
nkGraphics::TextureExternalData::setRenderFlag
void setRenderFlag(TEXTURE_RENDER_FLAG value)
nkGraphics::RENDERING_API
RENDERING_API
Enumerates supported graphics API.
Definition: RenderingApi.h:14
nkGraphics::RESOURCE_STATE::RENDER_TARGET
@ RENDER_TARGET
Resource is in the render target state.
nkGraphics::TextureExternalData::getState
RESOURCE_STATE getState() const
nkGraphics::TextureExternalData::getId
unsigned int getId() const
nkGraphics::TextureExternalData::getResource
void * getResource() const
nkGraphics::TextureExternalData::forDx12
static TextureExternalData forDx12(void *resource, RESOURCE_STATE state)
nkGraphics::TextureExternalData::getGammaCorrect
bool getGammaCorrect() const
nkGraphics::TextureExternalData::forGles
static TextureExternalData forGles(unsigned int id)
nkGraphics::TextureExternalData::setGammaCorrect
void setGammaCorrect(bool value)
nkGraphics::RESOURCE_STATE::DEPTH_TARGET
@ DEPTH_TARGET
Resource is in the depth write state.
nkGraphics::TextureExternalData::~TextureExternalData
~TextureExternalData()
nkGraphics::TextureExternalData::getTargetApi
RENDERING_API getTargetApi() const
nkGraphics::TextureExternalData::forDx11
static TextureExternalData forDx11(void *resource)
nkGraphics::TextureExternalData::getRenderFlag
TEXTURE_RENDER_FLAG getRenderFlag() const
nkGraphics::RESOURCE_STATE
RESOURCE_STATE
Possible states for an external resource, in the context of the Dx12Renderer.
Definition: TextureExternalData.h:12
nkGraphics
Encompasses all API of component NilkinsGraphics.
Definition: BoundingBox.h:7
nkGraphics::RESOURCE_STATE::COMMON
@ COMMON
Resource is in common / present state.
nkGraphics::TextureExternalData
External texture data, allowing to inject low-level constructs within the renderers.
Definition: TextureExternalData.h:36
nkGraphics::TEXTURE_RENDER_FLAG
TEXTURE_RENDER_FLAG
The render flag possible for a texture.
Definition: TextureRenderFlag.h:12